Complete API reference for the @on_task decorator for event-driven task handling
@on_task
decorator automatically:
task
parametertask
parameter as its first argument@on_task
decorator, it automatically:
task
parameterXPANDER_API_KEY
, XPANDER_ORGANIZATION_ID
, etc.)XPANDER_AGENT_ID
environment variabletask
parameter passed to your function contains:
AgentExecutionStatus
](/API reference/types#agentexecutionstatus): Task execution statusesAgentExecutionInput
](/API reference/types#agentexecutioninput): Task input structureOutputFormat
](/API reference/types#outputformat): Output format options